<!DOCTYPE HTML>
<html>
<head>
<link href="css/qam.css" rel="stylesheet" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>


.wrap{width:980px;margin:0 auto;position:relative}
.qam_nav_list{}
.qam_nav_list a{display:inline-block;text-decoration:none;color:#C93D00;font-size:12px;height:22px;line-height:22px;border:#E8E8FF solid 1px;padding-left:15px;padding-right:15px;margin-left:-1px;border-radius:6px;}
.qam_nav_list a:hover{color:#F1EDED;background:#8000FF}
.qam_nav_list a.current{color:#F1EDED;background:#6181B9;font-weight:bold}
.qam_nav_list li{list-style-type:none;float:left;}

.qam_nav_list{overflow:hidden;margin:20px 10px;}

.qam_frame{clear:both;width:980px;height:1500px;overflow:hidden;}

#user_box{position:absolute;right:0px;top:5px;font-size:12px;}
#user_box a{margin-left:10px;}
</style>


</head>
<body>

<div class="wrap">
	<div class="qam_main">
		<ul class="qam_nav_list" id="qam_nav_list" >
			<li><a href="login.htm" target="myframe" class="current">登陆</a></li>
			<li><a href="user.htm" target="myframe">用户管理</a></li>
			<li><a href="group.htm" target="myframe">用户组管理</a></li>
			<li><a href="power.htm" target="myframe">权限管理</a></li>
			<li><a href="project.htm" target="myframe">项目</a></li>
			<li><a href="project_type.htm" target="myframe">项目类型</a></li>
			<li><a href="page.htm" target="myframe">页面</a></li>
			<li><a href="frame.htm" target="myframe">框架</a></li>
			<li><a href="module.htm" target="myframe">模块</a></li>
			<li><a href="component.htm" target="myframe">组件</a></li>
			<li><a href="setting.htm" target="myframe">设置</a></li>
			<li><a href="sql.htm" target="myframe">备份</a></li>
		</ul>
		<div id="user_box"></div>
		<iframe src="setting.htm"  name="myframe" class="qam_frame"></iframe>
	</div>
</div>

<script src="js/ajax.js" type="text/javascript"></script>
<script src="js/md5.js" type="text/javascript"></script>
<script src="js/function.js" type="text/javascript"></script>

<script>
var nav_list
function init(){
	//初始化导航列表
	nav_list=$$("qam_nav_list").getElementsByTagName("a");
	for(var i=0;i<nav_list.length;i++)
	{
		nav_list[i].onclick=function(){nav_reset();this.className="current"}
	}
	load_user_cookie();
	
}


/*加载用户信息start*/
function load_user_cookie(){
	var _url=cgipath+"user-cookie";
	var ajax_obj=new AJAX_OBJ(_url,handle_load_user_cookie,handle_error,5000);
	ajax_obj.postData();
}

function handle_load_user_cookie(xmlHttp){
	//$$("user_box").innerHTML=xmlHttp.responseText;return;
	eval("var ret_json="+xmlHttp.responseText);
	var str="欢迎你，";
	if(ret_json.ret==0){
		str+=""+ret_json.data.nick+"<a href=\"javascript:logout();\">注销</a>";
	}else{
		str+="<a href=\"login.htm\" target=\"myframe\">登陆</a>";
	}
	$$("user_box").innerHTML=str
}
/*加载用户信息end*/

/*****logout********/
function logout(){
	var _url=cgipath+"user-logout";
	var ajax_obj=new AJAX_OBJ(_url,handle_logout,handle_error,5000);
	ajax_obj.postData();
}
function handle_logout(xmlHttp){
	window.location.reload(); 
}


function nav_reset(){
	for(var i=0;i<nav_list.length;i++)
	{
		nav_list[i].className=""
	}
}
</script>
<script src="js/public.js" type="text/javascript"></script>

</body>



</html>